using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;

namespace UrduCtrl
{
	/// <summary>
	/// Summary description for UrduTextPropertyEditor.
	/// </summary>
	public class UrduTextPropertyEditorDlg : System.Windows.Forms.Form
	{
		//private System.Windows.Forms.TextBox txtEdit;
		private UrduTextBox txtEdit;
		private System.Windows.Forms.Button btnOk;
		private string m_strText;

		/// <summary>
		/// Required designer variable.
		/// </summary>
		private System.ComponentModel.Container components = null;

		public UrduTextPropertyEditorDlg()
		{
			//
			// Required for Windows Form Designer support
			//
			InitializeComponent();

			//
			// TODO: Add any constructor code after InitializeComponent call
			//
		}

		/// <summary>
		/// Clean up any resources being used.
		/// </summary>
		protected override void Dispose( bool disposing )
		{
			if( disposing )
			{
				if(components != null)
				{
					components.Dispose();
				}
			}
			base.Dispose( disposing );
		}

		public string EditedText
		{
			set
			{
				m_strText= value;
				this.txtEdit.Text= m_strText;
			}

			get
			{
				return m_strText;
			}
		}

		#region Windows Form Designer generated code
		/// <summary>
		/// Required method for Designer support - do not modify
		/// the contents of this method with the code editor.
		/// </summary>
		private void InitializeComponent()
		{
			this.txtEdit = new UrduCtrl.UrduTextBox();
			this.btnOk = new System.Windows.Forms.Button();
			this.SuspendLayout();
			// 
			// txtEdit
			// 
			this.txtEdit.Font = new System.Drawing.Font("Urdu Naskh Asiatype", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(178)));
			this.txtEdit.Location = new System.Drawing.Point(88, 8);
			this.txtEdit.Name = "txtEdit";
			this.txtEdit.RightToLeft = System.Windows.Forms.RightToLeft.Yes;
			this.txtEdit.Size = new System.Drawing.Size(168, 37);
			this.txtEdit.TabIndex = 0;
			this.txtEdit.Text = "textBox1";
			this.txtEdit.TextChanged += new System.EventHandler(this.txtEdit_TextChanged);
			// 
			// btnOk
			// 
			this.btnOk.DialogResult = System.Windows.Forms.DialogResult.OK;
			this.btnOk.Location = new System.Drawing.Point(0, 8);
			this.btnOk.Name = "btnOk";
			this.btnOk.Size = new System.Drawing.Size(75, 32);
			this.btnOk.TabIndex = 1;
			this.btnOk.Text = "Ok";
			// 
			// UrduTextPropertyEditorDlg
			// 
			this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
			this.ClientSize = new System.Drawing.Size(264, 53);
			this.Controls.Add(this.btnOk);
			this.Controls.Add(this.txtEdit);
			this.Name = "UrduTextPropertyEditorDlg";
			this.Text = "UrduTextPropertyEditor";
			this.ResumeLayout(false);

		}
		#endregion

		private void txtEdit_TextChanged(object sender, System.EventArgs e)
		{
			m_strText= this.txtEdit.Text;
		}

//		private void btnOk_Click(object sender, System.EventArgs e)
//		{			
//			this.DialogResult = DialogResult.OK;
//		}
	}
}
